package com.leyou.item.mapper;

import com.leyou.item.entity.Sku;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.special.InsertListMapper;

import java.util.List;

public interface SkuMapper  extends Mapper<Sku>,InsertListMapper<Sku>{
    @Select("select * from tb_sku where spu_id=#{id}")
    List<Sku> querySkuById(@Param("id") Long id);
    @Delete("delete from tb_sku where spu_id=#{id}")
    void deleteSkuBySpuId(@Param("id") Long spuId);
}
